//在真实开发中，仓库中的状态也是分模块的
//combineReducers reducers是管理员的意思 修改状态需要通过管理员
//combine是合并的意思 有很多的子store ,就有很多的reducer
//合并reducer 就相当于合并子store
 import { createStore,combineReducers,applyMiddleware,compose } from "redux";
import app from './modules/app'
import user from "./modules/user"
import logger from 'redux-logger'
import thunk from 'redux-thunk'
//reducer是合并后的总reducer
const reducer = combineReducers({
    app,
    user
})
//创建仓库需要有个管理
const store = createStore(reducer,compose(applyMiddleware(thunk),applyMiddleware(logger)))
export default store